package com.xxl.job.executor.jobhandler;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import com.xxl.job.executor.service.ICountGrantryService;
import com.xxl.job.executor.service.ICountProTransService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 统计省级数据传输报表
 */
@JobHandler(value="countProTransJobHandler")
@Component
public class CountProTransJobHandler extends IJobHandler {

    @Autowired
    private ICountProTransService countProTransService;

    @Override
    public ReturnT<String> execute(String param) throws Exception {
        XxlJobLogger.log("开始执行数据同步任务");

        countProTransService.transfer();

        XxlJobLogger.log("执行数据同步任务结束");
        return SUCCESS;
    }
}
